<?php
use yii\helpers\Html;
use yii\helpers\Url;

use common\models\MktPost;
?>

<div class="weui_media_box weui_media_appmsg">
    <a class="weui_media_hd" style="margin-top: -50px;" onclick="gotoProfile(<?php echo $model->post->user_id; ?>)">
        <img alt="" src="<?php echo \common\wosotech\Util::getWxUserHeadimgurl($model->post->user->theHeadimgurl, 46); ?>" style="height: 42px !important;width: 42px !important;" class="weui_media_appmsg_thumb">
    </a>
    <div class="weui_media_box weui_media_text" style="width:100%;">
        <div style="float:right;" onclick="deleteCollect(<?php echo $model->id; ?>); return false;"><img style="width:20px;height:20px;" src="resources/images/self/u1880.png"></div>
        <h4 onclick="gotoProfile(<?php echo $model->post->user_id; ?>)" class="weui_media_title"><span class="name" style="color:#576b95 !important;"><?php echo $model->post->user->theName; ?></span><?php echo $model->post->user->theCompany . $model->post->user->theDuty; ?></h4>
        <div class="weui_info_box">
            <h4 class="weui_media_title" style="color: #353535;"><?php echo $model->post->theTitle; ?></h4>
            <ul class="weui_media_info">
                <li class="weui_media_info_meta"><?echo $model->post->area->getPaths(''); ?></li>
                <?php if ($model->post->post_type == MktPost::POST_TYPE_JOB): ?>
                    <li class="weui_media_info_meta weui_media_info_meta_extra"><?php echo MktPost::getPostJobExperienceOption($model->post->job_experience); ?></li>
                    <li class="weui_media_info_meta weui_media_info_meta_extra"><?php echo MktPost::getPostJobSalaryMinOption($model->post->job_salary_min) . ' - ' . MktPost::getPostJobSalaryMaxOption($model->post->job_salary_max); ?></li>
                <?php elseif ($model->post->post_type == MktPost::POST_TYPE_COOPERATION): ?>
                    <li class="weui_media_info_meta weui_media_info_meta_extra"><?php echo $model->post->shortStartTime; ?></li>
                    <li class="weui_media_info_meta weui_media_info_meta_extra"><?php echo $model->post->shortContent; ?></li>
                <?php else: ?>
                <?php endif; ?>

            </ul>
        </div>
        <div style="color:#cccccc;font-size: 12px;height:20px;line-height:20px;"><?php echo \common\wosotech\Util::timeago($model->create_time); ?></div>
    </div>
</div>

<?php
/*
`$model`: mixed, the data model
`$key`: mixed, the key value associated with the data item
`$index`: integer, the zero-based index of the data item in the items array returned by [[dataProvider]].
`$widget`: ListView, this widget instance

		<div class="weui_media_box weui_media_appmsg">
			<a class="weui_media_hd" style="margin-top: -50px;" onclick="gotoManDetail(1)">
				<img alt="" src="resources/images/avatar/tx.jpg" style="height: 42px !important;width: 42px !important;" class="weui_media_appmsg_thumb">
			</a>
			<div class="weui_media_box weui_media_text" style="width:100%;">
				<div style="float:right;"><img style="width:20px;height:20px;" src="resources/images/self/u1880.png"></div>
				<h4 onclick="gotoManDetail(1)" class="weui_media_title"><span class="name" style="color:#576b95 !important;">王可</span>艺米沙画总经理</h4>
				<div class="weui_info_box">
					<h4 class="weui_media_title" style="color: #353535;">招聘市场经理</h4>
					<ul class="weui_media_info">
						<li class="weui_media_info_meta">江汉区</li>
						<li class="weui_media_info_meta weui_media_info_meta_extra">2年工作经验</li>
						<li class="weui_media_info_meta weui_media_info_meta_extra">5K+</li>
					</ul>
				</div>
				<div style="color:#cccccc;font-size: 12px;height:20px;line-height:20px;">5分钟前</div>
			</div>
		</div>

*/